//分类
import { CLASSIFY } from './api';
import { request, METHOD } from '@/utils/request';
//添加分类
export async function addClassifyApi(params) {
  return request(CLASSIFY + '/create', METHOD.POST, params);
}
//修改分类
export async function editClassifyApi(params) {
  return request(CLASSIFY + '/update/', METHOD.PUT, params);
}
//删除分类
export async function delClassifyApi(params) {
  return request(CLASSIFY + '/delete/', METHOD.DELETE, params.id);
}
//获取所有分类
export async function classifyListApi(params) {
  return request(CLASSIFY + '/get', METHOD.GET, params);
}
export default {
  addClassifyApi,
  editClassifyApi,
  delClassifyApi,
  classifyListApi,
};
